#ifndef _VBUFFER_DX9_H_
#define _VBUFFER_DX9_H_

#include "ivbuffer.h"
#include <d3d9.h>

class vbuffer_dx9: public vbuffer
{
	friend class render_dx9;
public:
	vbuffer_dx9(IDirect3DDevice9* _device,u32 _size,buffer_usage _usage,u32 _format,u32 _block_size);
	~vbuffer_dx9();

	void* lock(buffer_lock _lock);
	void unlock();

protected:
	IDirect3DVertexBuffer9* m_d3dvbuffer;
};

class ibuffer_dx9: public ibuffer
{
	friend class render_dx9;
public:
	ibuffer_dx9(IDirect3DDevice9* _device,u32 _size,buffer_usage _usage);
	~ibuffer_dx9();

	void* lock(buffer_lock _lock);
	void unlock();

protected:
	IDirect3DIndexBuffer9* m_d3dibuffer;
private:
	IDirect3DDevice9* m_d3ddevice;
};

#endif